Boundaries API- get geometry & hierarchy

Administrative, political, postcode and other boundaries

Use cases for IP Geolocation API

Provide the best service for your customers considering customer location

Part Of - boundaries the location belongs to


The API endpoint lets to query all the boundaries the specified location belongs to. For example, get a county, state, and country for a city or coordinates.

commencer maintenant

Consists Of - subdivisions of the location


Get all boundaries that belong to the specified location. Choose a level and boundary types. For example, get all states or counties of a country, districts or neighborhoods of a city.

voir les prix

Use cases for IP Geolocation API

Provide the best service for your customers considering customer location

Boundary types


The API support multiple boundary types - administrative, political, postcode, low emmision zones and other boundaries.

Geometry accuracy


The API allows to optimize responce size by choosing an accuracy of returned geometry. Moreover, you can query boundary details and get original geometry, polulation data and more with Place Details API.

GeoJSON as result


The API returns GeoJSON object as a result that can be natively visualized by client map libraries - MapLibre GL, Leaflet, OpenLayers. Contact us if functionality required for your business case is missing in the current APIs!

Getting started

Works via HTTP and returns a GeoJSON object

STEP1 :Add the Leaflet to your project

LYou will require an API Key to use the API. Register on MyProject Geoapify and get an API key.

Generate an HTTP Get request with input data and make the call. Use our Playground and Documentation learn about Boundaries API request/response structure. Boundaries API can be called with Latitude, Longitude coordinates or with a place id parameter returned by Geocoding API or Places API. Here is an example of a "consists of " API request:

Places API response object example

Choose a city or postcode on a website (city level)

The API returns GeoJSON.FeatureCollection object as a result. Each result object has:

  • a categories list that lists all the categories and conditions corresponding to the place;
  • the details information available that can be queried with Place Details API;
  • the place ID for the Place Details API.

Here is an example of the response object:

type: “FeatureCollection”
features: [] 1 item
0: {} 3 keys
type: “Feature”
properties: {} 20 keys
  • name:"Monument du Général Kléber "
  • street:"Place Kléber "
  • neighbourhood:"La Petite France "
  • suburb:"Krutenau "
  • city:"Strasbourg "
  • municipality:"Strasbourg "
  • county:"Bas-Rhin "
  • state:"Grand Est "
  • country:"France "
  • country_code:"fr "
  • lon:7.745774519707208
  • lat:48.58337235
  • formatted:"Monument du Général Kléber, Place Kléber, Strasbourg, France "
  • address_line1:"Monument du Général Kléber "
  • address_line2:"Place Kléber, Strasbourg, France "

Call the Places API

Here are some code samples that show how to use the Places API in different programming languages:

More information about a place with the Place Details API

The Place Details API provides comprehensive information about its geometry, contact information, open hours, and more. Together with standard information about the place, it's possible to query related features and analytical data. For example, all commercials that are reachable within 5 minutes, schools and kindergartens nearby, and the closest public transport stops.

Need more categories and conditions?

We constantly increase the number of categories and conditions. The list already includes all common amenity types. However, it might not cover some cases. Contact us and describe your business case. We will be happy to extend the API to cover it!

FAQ

  • Create vector and raster maps you can use as a base-map layer for Leaflet, MapLibre GL, OpenLayers, QGIS, and other map libraries and GIS. Or use our Static Maps API to generate map images and map markers. Choose between different map styles and colors to match your app and website design.
  • Create vector and raster maps you can use as a base-map layer for Leaflet, MapLibre GL, OpenLayers, QGIS, and other map libraries and GIS. Or use our Static Maps API to generate map images and map markers. Choose between different map styles and colors to match your app and website design.

  • Create vector and raster maps you can use as a base-map layer for Leaflet, MapLibre GL, OpenLayers, QGIS, and other map libraries and GIS. Or use our Static Maps API to generate map images and map markers. Choose between different map styles and colors to match your app and website design.
  • Create vector and raster maps you can use as a base-map layer for Leaflet, MapLibre GL, OpenLayers, QGIS, and other map libraries and GIS. Or use our Static Maps API to generate map images and map markers. Choose between different map styles and colors to match your app and website design.

  • Create vector and raster maps you can use as a base-map layer for Leaflet, MapLibre GL, OpenLayers, QGIS, and other map libraries and GIS. Or use our Static Maps API to generate map images and map markers. Choose between different map styles and colors to match your app and website design.
  • Create vector and raster maps you can use as a base-map layer for Leaflet, MapLibre GL, OpenLayers, QGIS, and other map libraries and GIS. Or use our Static Maps API to generate map images and map markers. Choose between different map styles and colors to match your app and website design.